clear all
set mem 1000000
use "C:\Users\spiston\Dropbox\Non-project stuff\Grants\BITSS Sloan\Kalmoe and Piston 2013 POQ replication\AP Yahoo\AP_Election_2008_public.dta" 
set more off 

//female
gen female=ppgender
recode female 1=0 2=1

//education 
gen educnhs=.
recode educnhs .=0 if ppeduc~=.
recode educnhs 0=1 if ppeduc==1|ppeduc==2

gen educhs=.
recode educhs .=0 if ppeduc~=.
recode educhs 0=1 if ppeduc==3

gen educsc=.
recode educsc .=0 if ppeduc~=.
recode educsc 0=1 if ppeduc==4|ppeduc==5

gen educcg=.
recode educcg .=0 if ppeduc~=.
recode educcg 0=1 if ppeduc>=6 & ppeduc<=9

//Age
gen age18to24=.
recode age18to24 .=0 if ppage>0 & ppage<110
recode age18to24 0=1 if ppage>=18 & ppage<=24
tab age18to24 ppage, miss

gen age25to34=.
recode age25to34 .=0 if ppage>0 & ppage<110
recode age25to34 0=1 if ppage>=25 & ppage<=34
tab age25to34 ppage, miss

gen age35to44=.
recode age35to44 .=0 if ppage>0 & ppage<110
recode age35to44 0=1 if ppage>=35 & ppage<=44
tab age35to44 ppage, miss

gen age45to54=.
recode age45to54 .=0 if ppage>0 & ppage<110
recode age45to54 0=1 if ppage>=45 & ppage<=54
tab age45to54 ppage, miss

gen age55to64=.
recode age55to64 .=0 if ppage>0 & ppage<110
recode age55to64 0=1 if ppage>=55 & ppage<=64
tab age55to64 ppage, miss

gen age65to74=.
recode age65to74 .=0 if ppage>0 & ppage<110
recode age65to74 0=1 if ppage>=65 & ppage<=74
tab age65to74 ppage, miss

gen age75plus=.
recode age75plus .=0 if ppage>0 & ppage<110
recode age75plus 0=1 if ppage>=75 & ppage<=109
tab age75plus ppage, miss

//income 
//note: there were no missing answers for income 

gen inc0to14=0
recode inc0to14 0=1 if ppinc==1
recode inc0to14 0=1 if ppinc==2
recode inc0to14 0=1 if ppinc==3
recode inc0to14 0=1 if ppinc==4
recode inc0to14 0=1 if ppinc==5

gen inc15to34=0
recode inc15to34 0=1 if ppinc==6 
recode inc15to34 0=1 if ppinc==7 
recode inc15to34 0=1 if ppinc==8 
recode inc15to34 0=1 if ppinc==9 

gen inc35to59=0 
recode inc35to59 0=1 if ppinc==10
recode inc35to59 0=1 if ppinc==11
recode inc35to59 0=1 if ppinc==12

gen inc60to74=0
recode inc60to74 0=1 if ppinc==13

gen inc75to99=0
recode inc75to99 0=1 if ppinc==14
recode inc75to99 0=1 if ppinc==15

gen inc100plus=0
recode inc100plus 0=1 if ppinc==16
recode inc100plus 0=1 if ppinc==17
recode inc100plus 0=1 if ppinc==18
recode inc100plus 0=1 if ppinc==19

//habitual voting
gen votealways=.
recode votealways .=1 if lv6_w6==1
recode votealways .=0 if lv6_w6==2
recode votealways .=0 if lv6_w6==3
recode votealways .=0 if lv6_w6==4
recode votealways .=0 if lv6_w6==5

gen votenearlyalways=.
recode votenearlyalways .=0 if lv6_w6==1
recode votenearlyalways .=1 if lv6_w6==2
recode votenearlyalways .=0 if lv6_w6==3
recode votenearlyalways .=0 if lv6_w6==4
recode votenearlyalways .=0 if lv6_w6==5

gen votepart=.
recode votepart .=0 if lv6_w6==1
recode votepart .=0 if lv6_w6==2
recode votepart .=1 if lv6_w6==3
recode votepart .=0 if lv6_w6==4
recode votepart .=0 if lv6_w6==5
tab votepart, miss

gen voteseldom=.
recode voteseldom .=0 if lv6_w6==1
recode voteseldom .=0 if lv6_w6==2
recode voteseldom .=0 if lv6_w6==3
recode voteseldom .=1 if lv6_w6==4
recode voteseldom .=0 if lv6_w6==5
tab voteseldom, miss

//Do you know where people vote around here?
gen knowwherevote=.
recode knowwherevote .=1 if lv7_w6==1
recode knowwherevote .=0 if lv7_w6==2

//region
//census northeast
gen censusne=0
recode censusne 0=1 if ppreg4==1
tab censusne ppreg4

//census midwest
gen censusmw=0
recode censusmw 0=1 if ppreg4==2
tab censusmw ppreg4, miss

//census south
gen censussouth=0
recode censussouth 0=1 if ppreg4==3
tab censussouth ppreg4, miss

//census west
gen censuswest=0
recode censuswest 0=1 if ppreg4==4
tab censuswest ppreg4, miss

//party id 
gen pidrep=pid1_w6
recode pidrep -1=. 1=1 2=5 3/5=3
recode pidrep 1=0 if pid2_w6==1
recode pidrep 5=6 if pid2_w6==1
recode pidrep 3=2 if pid3_w6==1
recode pidrep .=2 if pid3_w6==1
recode pidrep 3=4 if pid3_w6==2
recode pidrep .=4 if pid3_w6==2
 
//hisp 
gen hisp=pphispan
recode hisp 1=0 2/8=1

//white, non-hisp
gen nhwhite=ppethm
recode nhwhite 2/5=0

//other (race) 
gen other=ppracem
recode other 1=0 2=0 3/6=1

//black
gen black=ppracem
recode black 1 3/6=0 2=1

//voteobama
gen voteobama=vote
recode voteobama 1=. 2=1 3=0 4=.

//votemccain
gen votemccain=vote
recode votemccain 1=. 2=0 3=1 4=.

//votethirdparty
gen votethirdparty=vote
recode votethirdparty 1=. 2/3=0 4=1

//turnout
gen turnout=vote
recode turnout 1=0 2/4=1

//racial resentment-Irish, Italians, etc.*
gen raceirish=rac12_1_w6
recode raceirish -1=. 1=0 2=.25 3=.5 4=.75 5=1
tab raceirish rac12_1_w6, miss

//racial resentment-if blacks would only try*
gen racetry=rac12_2_w6
recode racetry -1=. 1=0 2=.25 3=.5 4=.75 5=1
tab racetry rac12_2_w6, miss

//racial resentment-generations of slavery have made it difficult*
gen racegenrev=rac12_3_w6
recode racegenrev -1=. 1=1 2=.75 3=.5 4=.25 5=0
tab racegenrev rac12_3_w6, miss

//racial resentment-over past few years blacks have gotten less than they deserve*
gen racedesrev=rac12_4_w6
recode racedesrev -1=. 1=1 2=.75 3=.5 4=.25 5=0
tab racedesrev rac12_4_w6, miss

//racial resentment-over past few years blacks have gotten more economically than they deserve*
gen raceecon=rac12_7_w6
recode raceecon -1=. 1=0 2=.25 3=.5 4=.75 5=1
tab raceecon rac12_7_w6, miss

//racial resentment-black leaders pushing too fast*
gen racepush=rac13_w6
recode racepush -1=. 1=1 2=0 3=.5
tab racepush rac13_w6, miss

//racial resentment-blacks create racial tension*
gen racetension=rac14_w6
recode racetension -1=. 1=1 2=.67 3=.33 4=0
tab racetension rac14_w6, miss

//racial resentment-discrimination against blacks*
gen racediscrev=rac15_w6
recode racediscrev -1=. 1=0 2=.33 3=.67 4=1
tab racediscrev rac15_w6, miss

//racerespasek-racial resentment index
gen racerespasek=(racediscrev+racetension+racepush+raceecon+racetry+raceirish+racedesrev+racegenrev)/8
alpha racediscrev racetension racepush raceecon racetry raceirish racedesrev racegenrev, gen (racerespasekalpha)

//Pasek et al. 4 category dependent variable 
gen beh=.
recode beh .=1 if voteobama==1
recode beh .=2 if votemccain==1
recode beh .=3 if votethirdparty==1
recode beh .=4 if turnout==0 

*Racial Policies
gen affact_w2=iss12_1_w2
recode affact_w2 -1=. 1=1 2=.75 3=.5 4=.25 5=0

gen candaffact_w2=cis7_5_w2
recode candaffact_w2 -1=. 1=0 2=.25 3=.5 4=.75 5=1

gen racepriority_w4=iss18_14_w4
recode racepriority_w4 1=0 2=.25 3=.5 4=.75 5=1 else=.

gen affact_w9=iss34_11_w9
recode affact_w9 -1=. 1=0 2=1 3=.5 else=.

*Candidate Evals 
gen obamafav_6=fav1_4_w6
recode obamafav_6 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mccainfav_6=fav1_9_w6
recode mccainfav_6 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mofavdif6=(1+mccainfav_6-obamafav_6)/2

gen obamafav_7=fav1_4_w7
recode obamafav_7 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mccainfav_7=fav1_9_w7
recode mccainfav_7 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mofavdif7=(1+mccainfav_7-obamafav_7)/2

gen obamafav_8=fav1_4_w8
recode obamafav_8 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mccainfav_8=fav1_9_w8
recode mccainfav_8 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mofavdif8=(1+mccainfav_8-obamafav_8)/2

gen obamafav_9=fav1_4_w9
recode obamafav_9 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mccainfav_9=fav1_9_w9
recode mccainfav_9 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mofavdif9=(1+mccainfav_9-obamafav_9)/2

gen obamafav_11=fav1_4_w11
recode obamafav_11 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mccainfav_11=fav1_9_w11
recode mccainfav_11 -1=. 1=1 2=.67 3=.33 4=0 5=.5

gen mofavdif11=(1+mccainfav_11-obamafav_11)/2

//dem
gen dem=pidrep
recode dem 0/1=1 2/6=0

//rep
gen rep=pidrep
recode rep 5/6=1 1/4=0  

//ideology 
gen id0to1=id2_w10
recode id0to1 -1=.5 1=0 2=.17 3=.33 4=.5 5=.66 6=.83 7=1 else=.
gen lib=id0to1
recode lib 0/.49=1 .5/1=0 else=.
gen cons=id0to1 
recode cons 0/.5=0 .51/1=1 else=.

//AMP
gen black1=Face1_W6
recode black1 1=1 2=0 else=.
gen black1miss=Face1_W6
recode black1miss . -100/-1=1 else=0
gen black2=Face2_W6
recode black2 1=1 2=0 else=.
gen black2miss=Face2_W6
recode black2miss . -100/-1=1 else=0
gen black3=Face3_W6
recode black3 1=1 2=0 else=.
gen black3miss=Face3_W6
recode black3miss . -100/-1=1 else=0
gen black4=Face4_W6
recode black4 1=1 2=0 else=.
gen black4miss=Face4_W6
recode black4miss . -100/-1=1 else=0
gen black5=Face5_W6
recode black5 1=1 2=0 else=.
gen black5miss=Face5_W6
recode black5miss . -100/-1=1 else=0
gen black6=Face6_W6
recode black6 1=1 2=0 else=.
gen black6miss=Face6_W6
recode black6miss . -100/-1=1 else=0
gen black7=Face7_W6
recode black7 1=1 2=0 else=.
gen black7miss=Face7_W6
recode black7miss . -100/-1=1 else=0
gen black8=Face8_W6
recode black8 1=1 2=0 else=.
gen black8miss=Face8_W6
recode black8miss . -100/-1=1 else=0
gen black9=Face9_W6
recode black9 1=1 2=0 else=.
gen black9miss=Face9_W6
recode black9miss . -100/-1=1 else=0
gen black10=Face10_W6
recode black10 1=1 2=0 else=.
gen black10miss=Face10_W6
recode black10miss . -100/-1=1 else=0
gen black11=Face11_W6
recode black11 1=1 2=0 else=.
gen black11miss=Face11_W6
recode black11miss . -100/-1=1 else=0
gen black12=Face12_W6
recode black12 1=1 2=0 else=.
gen black12miss=Face12_W6
recode black12miss . -100/-1=1 else=0
gen black13=Face25_W6
recode black13 1=1 2=0 else=.
gen black13miss=Face25_W6
recode black13miss . -100/-1=1 else=0
gen black14=Face26_W6
recode black14 1=1 2=0 else=.
gen black14miss=Face26_W6
recode black14miss . -100/-1=1 else=0
gen black15=Face27_W6
recode black15 1=1 2=0 else=.
gen black15miss=Face27_W6
recode black15miss . -100/-1=1 else=0
gen black16=Face28_W6
recode black16 1=1 2=0 else=.
gen black16miss=Face28_W6
recode black16miss . -100/-1=1 else=0
gen black17=Face29_W6
recode black17 1=1 2=0 else=.
gen black17miss=Face29_W6
recode black17miss . -100/-1=1 else=0
gen black18=Face30_W6
recode black18 1=1 2=0 else=.
gen black18miss=Face30_W6
recode black18miss . -100/-1=1 else=0
gen black19=Face31_W6
recode black19 1=1 2=0 else=.
gen black19miss=Face31_W6
recode black19miss . -100/-1=1 else=0
gen black20=Face32_W6
recode black20 1=1 2=0 else=.
gen black20miss=Face32_W6
recode black20miss . -100/-1=1 else=0
gen black21=Face33_W6
recode black21 1=1 2=0 else=.
gen black21miss=Face33_W6
recode black21miss . -100/-1=1 else=0
gen black22=Face34_W6
recode black22 1=1 2=0 else=.
gen black22miss=Face34_W6
recode black22miss . -100/-1=1 else=0
gen black23=Face35_W6
recode black23 1=1 2=0 else=.
gen black23miss=Face35_W6
recode black23miss . -100/-1=1 else=0
gen black24=Face36_W6
recode black24 1=1 2=0 else=.
gen black24miss=Face36_W6
recode black24miss . -100/-1=1 else=0

gen blackmiss=(black1miss+black2miss+black3miss+black4miss+black5miss+black6miss+black7miss+black8miss+black9miss+black10miss+black11miss+black12miss+black13miss+black14miss+black15miss+black16miss+black17miss+black18miss+black19miss+black20miss+black21miss+black22miss+black23miss+black24miss)

gen white1=Face13_W6
recode white1 1=1 2=0 else=.
gen white1miss=Face13_W6
recode white1miss . -100/-1=1 else=0
gen white2=Face14_W6
recode white2 1=1 2=0 else=.
gen white2miss=Face14_W6
recode white2miss . -100/-1=1 else=0
gen white3=Face15_W6
recode white3 1=1 2=0 else=.
gen white3miss=Face15_W6
recode white3miss . -100/-1=1 else=0
gen white4=Face16_W6
recode white4 1=1 2=0 else=.
gen white4miss=Face16_W6
recode white4miss . -100/-1=1 else=0
gen white5=Face17_W6
recode white5 1=1 2=0 else=.
gen white5miss=Face17_W6
recode white5miss . -100/-1=1 else=0
gen white6=Face18_W6
recode white6 1=1 2=0 else=.
gen white6miss=Face18_W6
recode white6miss . -100/-1=1 else=0
gen white7=Face19_W6
recode white7 1=1 2=0 else=.
gen white7miss=Face19_W6
recode white7miss . -100/-1=1 else=0
gen white8=Face20_W6
recode white8 1=1 2=0 else=.
gen white8miss=Face20_W6
recode white8miss . -100/-1=1 else=0
gen white9=Face21_W6
recode white9 1=1 2=0 else=.
gen white9miss=Face21_W6
recode white9miss . -100/-1=1 else=0
gen white10=Face22_W6
recode white10 1=1 2=0 else=.
gen white10miss=Face22_W6
recode white10miss . -100/-1=1 else=0
gen white11=Face23_W6
recode white11 1=1 2=0 else=.
gen white11miss=Face23_W6
recode white11miss . -100/-1=1 else=0
gen white12=Face24_W6
recode white12 1=1 2=0 else=.
gen white12miss=Face24_W6
recode white12miss . -100/-1=1 else=0
gen white13=Face37_W6
recode white13 1=1 2=0 else=.
gen white13miss=Face37_W6
recode white13miss . -100/-1=1 else=0
gen white14=Face38_W6
recode white14 1=1 2=0 else=.
gen white14miss=Face38_W6
recode white14miss . -100/-1=1 else=0
gen white15=Face39_W6
recode white15 1=1 2=0 else=.
gen white15miss=Face39_W6
recode white15miss . -100/-1=1 else=0
gen white16=Face40_W6
recode white16 1=1 2=0 else=.
gen white16miss=Face40_W6
recode white16miss . -100/-1=1 else=0
gen white17=Face41_W6
recode white17 1=1 2=0 else=.
gen white17miss=Face41_W6
recode white17miss . -100/-1=1 else=0
gen white18=Face42_W6
recode white18 1=1 2=0 else=.
gen white18miss=Face42_W6
recode white18miss . -100/-1=1 else=0
gen white19=Face43_W6
recode white19 1=1 2=0 else=.
gen white19miss=Face43_W6
recode white19miss . -100/-1=1 else=0
gen white20=Face44_W6
recode white20 1=1 2=0 else=.
gen white20miss=Face44_W6
recode white20miss . -100/-1=1 else=0
gen white21=Face45_W6
recode white21 1=1 2=0 else=.
gen white21miss=Face45_W6
recode white21miss . -100/-1=1 else=0
gen white22=Face46_W6
recode white22 1=1 2=0 else=.
gen white22miss=Face46_W6
recode white22miss . -100/-1=1 else=0
gen white23=Face47_W6
recode white23 1=1 2=0 else=.
gen white23miss=Face47_W6
recode white23miss . -100/-1=1 else=0
gen white24=Face48_W6
recode white24 1=1 2=0 else=.
gen white24miss=Face48_W6
recode white24miss . -100/-1=1 else=0
gen whitemiss=(white1miss+white2miss+white3miss+white4miss+white5miss+white6miss+white7miss+white8miss+white9miss+white10miss+white11miss+white12miss+white13miss+white14miss+white15miss+white16miss+white17miss+white18miss+white19miss+white20miss+white21miss+white22miss+white23miss+white24miss)

gen amp1=(1+white1-black1)/2
gen amp2=(1+white2-black2)/2
gen amp3=(1+white3-black3)/2
gen amp4=(1+white4-black4)/2
gen amp5=(1+white5-black5)/2
gen amp6=(1+white6-black6)/2
gen amp7=(1+white7-black7)/2
gen amp8=(1+white8-black8)/2
gen amp9=(1+white9-black9)/2
gen amp10=(1+white10-black10)/2
gen amp11=(1+white11-black11)/2
gen amp12=(1+white12-black12)/2
gen amp13=(1+white13-black13)/2
gen amp14=(1+white14-black14)/2
gen amp15=(1+white15-black15)/2
gen amp16=(1+white16-black16)/2
gen amp17=(1+white17-black17)/2
gen amp18=(1+white18-black18)/2
gen amp19=(1+white19-black19)/2
gen amp20=(1+white20-black20)/2
gen amp21=(1+white21-black21)/2
gen amp22=(1+white22-black22)/2
gen amp23=(1+white23-black23)/2
gen amp24=(1+white24-black24)/2

recode black1 .=0 if black1miss==1
recode black2 .=0 if black2miss==1
recode black3 .=0 if black3miss==1
recode black4 .=0 if black4miss==1
recode black5 .=0 if black5miss==1
recode black6 .=0 if black6miss==1
recode black7 .=0 if black7miss==1
recode black8 .=0 if black8miss==1
recode black9 .=0 if black9miss==1
recode black10 .=0 if black10miss==1
recode black11 .=0 if black11miss==1
recode black12 .=0 if black12miss==1
recode black13 .=0 if black13miss==1
recode black14 .=0 if black14miss==1
recode black15 .=0 if black15miss==1
recode black16 .=0 if black16miss==1
recode black17 .=0 if black17miss==1
recode black18 .=0 if black18miss==1
recode black19 .=0 if black19miss==1
recode black20 .=0 if black20miss==1
recode black21 .=0 if black21miss==1
recode black22 .=0 if black22miss==1
recode black23 .=0 if black23miss==1
recode black24 .=0 if black24miss==1

recode white1 .=0 if white1miss==1
recode white2 .=0 if white2miss==1
recode white3 .=0 if white3miss==1
recode white4 .=0 if white4miss==1
recode white5 .=0 if white5miss==1
recode white6 .=0 if white6miss==1
recode white7 .=0 if white7miss==1
recode white8 .=0 if white8miss==1
recode white9 .=0 if white9miss==1
recode white10 .=0 if white10miss==1
recode white11 .=0 if white11miss==1
recode white12 .=0 if white12miss==1
recode white13 .=0 if white13miss==1
recode white14 .=0 if white14miss==1
recode white15 .=0 if white15miss==1
recode white16 .=0 if white16miss==1
recode white17 .=0 if white17miss==1
recode white18 .=0 if white18miss==1
recode white19 .=0 if white19miss==1
recode white20 .=0 if white20miss==1
recode white21 .=0 if white21miss==1
recode white22 .=0 if white22miss==1
recode white23 .=0 if white23miss==1
recode white24 .=0 if white24miss==1

gen blacktotal=(black1+black2+black3+black4+black5+black6+black7+black8+black9+black10+black11+black12+black13+black14+black15+black16+black17+black18+black19+black20+black21+black22+black23+black24)/(24-blackmiss) if blackmiss<2
gen whitetotal=(white1+white2+white3+white4+white5+white6+white7+white8+white9+white10+white11+white12+white13+white14+white15+white16+white17+white18+white19+white20+white21+white22+white23+white24)/(24-whitemiss) if whitemiss<2

gen amp=(1+whitetotal-blacktotal)/2

//Direction 
gen track=md1_w6
recode track 1=1 2=0 else=.

//Prefer moderate 
gen modpres=cis12_w6
recode modpres -1=. 1 2=0 3=1 else=.

//Bush approval 
gen bushapp=app1_w6
recode bushapp -1=.5 1=1 2=.75 3=.5 4=.25 5=0 else=.

//Authoritarian 
gen auth1=RAC18a_W6
recode auth1  1 2=0 3 4=1 else=.
gen auth2=RAC18b_W6
recode auth2 1 2=0 3 4=1 else=.
gen auth3=RAC18c_W6
recode auth3 1 2=0 3 4=1 else=.
gen auth=(3*auth1+2*auth2+auth3-1)/4

//Econ perceptions
gen econ=ec13_w6
recode econ 1=1 2=.75 3=.5 4=.25 5=0 else=.

//Registered
gen regcurrent=lv1_w6
recode regcurrent 1=1 2 3 4=0 else=.

gen regdif=lv1_w6
recode regdif 2=1 1 3 4=0 else=.

gen regdk=lv1_w6
recode regdk  4=1 1 2 3=0 else=.

gen regno=lv1_w6
recode regno 3=1 1 2 4=0 else=.

//Party Favorability
gen favdem6= fav2_1_w6
recode favdem6 1=1 2=.66 3=.33 4=0 else=.

gen favrep6= fav2_2_w6
recode favrep6 1=1 2=.66 3=.33 4=0 else=.

gen rdfavdif6=(1+favrep6-favdem6)/2

gen favdem7= fav2_1_w7
recode favdem7 1=1 2=.66 3=.33 4=0 else=.

gen favrep7= fav2_2_w7
recode favrep7 1=1 2=.66 3=.33 4=0 else=.

gen rdfavdif7=(1+favrep7-favdem7)/2

gen favdem8= fav2_1_w8
recode favdem8 1=1 2=.66 3=.33 4=0 else=.

gen favrep8= fav2_2_w8
recode favrep8 1=1 2=.66 3=.33 4=0 else=.

gen rdfavdif8=(1+favrep8-favdem8)/2

gen favdem9= fav2_1_w9
recode favdem9 1=1 2=.66 3=.33 4=0 else=.

gen favrep9= fav2_2_w9
recode favrep9 1=1 2=.66 3=.33 4=0 else=.

gen rdfavdif9=(1+favrep9-favdem9)/2

//Analyses
//Weights follow waves for the DV since primary IVs are measured in wave 6

//Table 1: The AMP, Explicit Prejudice, and Electoral Behavior in 2008
//For comparison of vote choice to excluded category
svyset [pweight=weight1a_w10]
svy: mlogit beh amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest, baseoutcome(1)
svy: mlogit beh amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest, baseoutcome(2)

//For comparison of non-voting with excluded category (Pasek et al. restrict turnout vars to this model)
svy: mlogit beh amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest regcurrent regdif regdk votealways votenearlyalways votepart knowwherevote, baseoutcome(1)
svy: mlogit beh amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest regcurrent regdif regdk votealways votenearlyalways votepart knowwherevote, baseoutcome(2)
  
//Table 3: Associations between the AMP and Evaluations of Candidates & Parties
svyset [pweight=weight5b_w6]
svy: reg obamafav_6 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg mofavdif6 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg favdem6 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg rdfavdif6 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 

svyset [pweight=weight1b_w7]
svy: reg obamafav_7 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg mofavdif7 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg favdem7 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg rdfavdif7 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 

svyset [pweight=weight1b_W8]
svy: reg obamafav_8 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg mofavdif8 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg favdem8 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg rdfavdif8 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 

svyset [pweight= weight1a_W9]
svy: reg obamafav_9 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg mofavdif9 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg favdem9 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg rdfavdif9 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 

svyset [pweight=weight1_W11]
svy: reg obamafav_11 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg mofavdif11 amp racerespasekalpha dem rep lib cons track econ bushapp modpres auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 

//Table 4: Associations between the AMP and Race-Relevant Policy Attitudes
svyset [pweight=weight5b_w6]
svy: reg affact_w2 amp racerespasekalpha dem rep lib cons auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 
svy: reg candaffact_w2 amp racerespasekalpha dem rep lib cons auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 

svy: reg racepriority_w4 amp racerespasekalpha dem rep lib cons auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 

svyset [pweight=weight1a_W9]
svy: reg affact_w9 amp racerespasekalpha dem rep lib cons auth age25to34 age35to44 age45to54 age55to64 age65to74 age75plus educhs educsc educcg inc15to34 inc35to59 inc60to74 inc75to99 inc100plus female black other hisp censusmw censussouth censuswest 

